<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = [11, 22]

        let map1 = new Map([
            [false, '我是布尔值当作key'],
            [null, '我是null当作key'],
            [arr, '我是数组当作key']
        ]);

        /*
             set(key,val)  添加一条数据
             get(key)  根据key获取val
             has(key)  是否存在key true:false
             delete(key) 删除某条数据
             clear() 清空所有数据
        */

        console.log(map1.get(arr)) //我是数组当作key
        map1.set(11, '我是number当作key')

        console.log(map1.has(arr));
        console.log(map1.delete(arr));
        console.log(map1);
        console.log(map1.clear());
    </script>
</body>

</html>